<template>
  <ga-form ref="formRef" :model="formData">
    <ga-form-item
      field="url"
      label="地址"
      label-col-flex="100px"
      :rules="[RULE.NOT_NULL]"
      :validate-trigger="['change', 'input']"
    >
      <ga-input v-model="formData.url" placeholder="请输入内容" />
    </ga-form-item>
    <ga-form-item
      field="token"
      label="Token"
      label-col-flex="100px"
      :rules="[RULE.NOT_NULL]"
      :validate-trigger="['change', 'input']"
    >
      <ga-input v-model="formData.token" placeholder="请输入内容" />
    </ga-form-item>
    <ga-form-item
      field="tokenName"
      label="TokenName"
      label-col-flex="100px"
      :rules="[RULE.NOT_NULL]"
      :validate-trigger="['change', 'input']"
    >
      <ga-input v-model="formData.tokenName" placeholder="请输入内容" />
    </ga-form-item>
  </ga-form>
</template>
<script setup>
import { ref, reactive } from "vue";
import { RULE } from "@/constant/validators";
const formRef = ref(null);
const formData = defineModel();
// const formData = reactive({
//   url: "",
//   token: "",
//   tokenName: "",
// });
defineExpose({
  formRef,
  formData,
});
</script>
